package club.janna.jrpc.remoting;

/**
 * @author Panbo.Guo
 */
public interface Codec {

    /**
     * 编码
     * @param obj
     * @return
     */
    byte[] encode(Object obj);

    /**
     * 解码
     * @param bytes
     * @return
     */
    Object decode(byte[] bytes);
}
